import java.awt.Dimension;
import java.awt.TextArea;

import javax.swing.JFrame;
import javax.swing.JPanel;

/**
 * 
 * @author Devin Wolanick
 * @Version 1.0
 * 
 * Debug Console Display
 */
public class DebugWindow {
	
	private TextArea oneInfo;
	private TextArea twoInfo;
	private TextArea threeInfo;
	private JFrame debugFrame;
	private static final String NL = System.getProperty("line.separator");  
	
	public DebugWindow() {
		JFrame debugFrame = new JFrame("Debug Frame");
		debugFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		this.debugFrame = debugFrame;
		TextArea oneInfo = new TextArea();
		TextArea twoInfo = new TextArea();
		TextArea threeInfo = new TextArea();
		oneInfo.setPreferredSize(new Dimension(200, 100));
		twoInfo.setPreferredSize(new Dimension(200, 100));
		threeInfo.setPreferredSize(new Dimension(200, 100));
		oneInfo.setEditable(false);
		twoInfo.setEditable(false);
		threeInfo.setEditable(false);
		this.oneInfo = oneInfo;
		this.twoInfo = twoInfo;
		this.threeInfo = threeInfo;
		JPanel mainPanel = new JPanel();
		debugFrame.getContentPane().add(mainPanel);
		mainPanel.add(oneInfo);
		mainPanel.add(twoInfo);
		mainPanel.add(threeInfo);
		debugFrame.pack();
		debugFrame.setResizable(false);
	}
	
	/**
	 * Switches Visibility
	 */
	public void switchVisible() {
		if (!debugFrame.isVisible())
			debugFrame.setVisible(true);
		else
			debugFrame.setVisible(false);
	}
	
	/**
	 * Adds text to Box One
	 * @param myString Text to add
	 */
	public void addOne(String myString) {
		this.oneInfo.append(myString+NL);
	}
	
	/**
	 * Adds text to Box Two
	 * @param myString Text to add
	 */
	public void addTwo(String myString) {
		this.twoInfo.append(myString+NL);
	}
	
	/**
	 * Adds text to Box Three
	 * @param myString Text to add
	 */
	public void addThree(String myString) {
		this.threeInfo.append(myString+NL);
	}
}